package com.changgou.pay.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author zero
 * @date 2020/7/13
 */

@FeignClient(name = "pay")
public interface PayFeign {

    //支付功能
    @GetMapping("/wxpay/nativePay")
    public Result<Map> nativePay(@RequestParam("orderId")String orderId, @RequestParam("money")Integer money);

    //关闭微信订单功能
    @PutMapping("/wxpay/close/{orderId}")
    public Result closeOrder(@PathVariable("orderId") String orderId);

    //查询微信订单功能
    @GetMapping("/wxpay/query/{orderId}")
    public Result queryOrder(@PathVariable("orderId") String orderId);
}
